package com.study.spmongodb.article.dao;


import com.study.spmongodb.article.po.Comment;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

/**
 * @author study
 * @version 1.0
 * @date 2020/10/11 10:18
 */
public interface CommentRepository extends MongoRepository<Comment, String> {

    Page<Comment> findByParentid(String parentid, Pageable pageable);

    Page<Comment> findByContentLike(String comtent, Pageable pageable);

    Page<Comment> findByContentLikeAndUseridLike(String content, String id, Pageable pageable);

    Page<Comment> findByContentLikeAndUseridEquals(String content, String id, Pageable pageable);

}
